﻿@using CMSMVC4.Filters
@model System.Data.DataTable
@if (Model != null)
{
    <table class="table table-striped span8" style="table-layout: fixed;">
        <tbody>
            @for (int i = 0; i < Model.Rows.Count; i++)
            {

                <tr>
                    <td style="word-wrap: break-word;">
                        @if (Model.Rows[i]["Type"].ToString().Equals(MenuType.GioiThieu.ToString()))
                        {
                            <a href="@Url.Action("Index", "GioiThieu")">
                                <div>@Model.Rows[i]["Name"].ToString()</div>
                            </a>
                        }
                        @if (Model.Rows[i]["Type"].ToString().Equals(MenuType.ThiteBi.ToString()))
                        { <a href="@Url.Action("Them", "ThietBi", new { id = Model.Rows[i]["Id"].ToString() })">
                            <div>@Model.Rows[i]["Name"].ToString()</div>
                        </a>}
                        @if (Model.Rows[i]["Type"].ToString().Equals(MenuType.DichVu.ToString()))
                        {
                            <a href="@Url.Action("Add", "Services", new { id = Model.Rows[i]["Id"].ToString() })">
                                <div>@Model.Rows[i]["Name"].ToString()</div>
                            </a>}
                        @if (Model.Rows[i]["Type"].ToString().Equals(MenuType.DoiTac.ToString()))
                        {
                            <a href="@Url.Action("Index", "DoiTac")">
                                <div>@Model.Rows[i]["Name"].ToString()</div>
                            </a>}
                        @if (Model.Rows[i]["Type"].ToString().Equals(MenuType.TinTuc.ToString()))
                        {
                            <a href="@Url.Action("AddNews", "News", new { id = Model.Rows[i]["PageId"].ToString() })">
                                <div>@Model.Rows[i]["Name"].ToString()</div>
                            </a>}
                    </td>
                </tr>
                    
            }
        </tbody>
    </table>  
}